package org.example.custom.mybatis.proxy;

import org.example.custom.mybatis.annotatiton.Select;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MapperProxy implements InvocationHandler {

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

        Select select = method.getAnnotation(Select.class);
        if(select != null){
            System.out.println(select.value());
        }
        return null;
    }
}
